package com.tceasy.gateway.domain;

import com.tceasy.orm.annotation.Id;
import com.tceasy.orm.annotation.Index;
import com.tceasy.orm.annotation.Sdb;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by zhanghuan on 2016/4/5.
 * 接入开放平台接口基本信息
 */
@Sdb(space = "openapi",collection = "service")
public class OpenService implements Serializable {
    @Id
    String method;/*接口方法路径*/
    String memo;/*功能描述*/
    @Index
    String name;/*系统名称*/
    @Index
    String url;/*接口地址*/
    String paramTemplate;/*参数模板*/
    /*http header content_type默认表单提交*/
    String contentType="application/x-www-form-urlencoded";
    String requestMethod= "POST";/*默认按post请求*/
    Date createTime;/*创建时间*/
    Date lastModifyTime;/*最后一次修改时间*/
    String author;/*负责人*/
    String state;/*开关状态：Y开，N关*/


    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getParamTemplate() {
        return paramTemplate;
    }

    public void setParamTemplate(String paramTemplate) {
        this.paramTemplate = paramTemplate;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getLastModifyTime() {
        return lastModifyTime;
    }

    public void setLastModifyTime(Date lastModifyTime) {
        this.lastModifyTime = lastModifyTime;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    private static final long serialVersionUID = 1L;

    @Override
    public String toString() {
        return "OpenService{" +
                "method='" + method + '\'' +
                ", memo='" + memo + '\'' +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", paramTemplate='" + paramTemplate + '\'' +
                ", contentType='" + contentType + '\'' +
                ", requestMethod=" + requestMethod +
                ", createTime=" + createTime +
                ", lastModifyTime=" + lastModifyTime +
                ", author='" + author + '\'' +
                ", state='" + state + '\'' +
                '}';
    }
}
